home *** CD-ROM | disk | FTP | other *** search
- ; MPImage - Amiga Image program
- ; Copyright (C) © 1993-96 Mark John Paddock
-
- ; mark@topic.demon.co.uk
- ; mpaddock@cix.compulink.co.uk
-
- ; This is the script to install MPImage
- ; $VER: Install-MPImage 4.2 (24.3.96)
-
- (complete 0)
-
- ; Determine machine config
- (Set Use040
- (=
- (database "cpu")
- 68040
- )
- )
-
- (Set Has881
- (+
- (AND
- (NOT (run "cpu check 68881"))
- (>=
- (database "cpu")
- 68020
- )
- )
- Use040
- )
- )
-
- (Set Has881
- (+
- (>=
- (database "cpu")
- 68020
- )
- Has881
- )
- )
-
- (Set InstallDir (expandpath ""))
-
- (Set DestLib
- (tackon InstallDir "MPImage.library")
- )
-
- ; Check choice of program to install
- (set Use881
- (askchoice
- (prompt "Install which version?")
- (help "There are three versions of the MPImage.library. "
- "The first requires just a 68000. "
- "The second requires a 68020. "
- "The third requires both a 68020 or 68030 CPU with a 68881 or 68882 FPU. "
- "The last requires a 68040.")
- (choices
- "68000"
- "68020"
- "68020/030/68881/2"
- "68040"
- )
- (default Has881)
- )
- )
-
- (if (= Use881 3)
- (
- (set SrcLib
- (tackon InstallDir "MPImage.library.040")
- )
- (copyfiles
- (source SrcLib)
- (dest InstallDir)
- (newname DestLib)
- )
- )
- )
-
- (if (= Use881 2)
- (
- (set SrcLib
- (tackon InstallDir "MPImage.library.881")
- )
- (copyfiles
- (source SrcLib)
- (dest InstallDir)
- (newname DestLib)
- )
- )
- )
-
- (if (= Use881 1)
- (
- (set SrcLib
- (tackon InstallDir "MPImage.library.020")
- )
- (copyfiles
- (source SrcLib)
- (dest InstallDir)
- (newname DestLib)
- )
- )
- )
-
- (if (= Use881 0)
- (
- (set SrcLib
- (tackon InstallDir "MPImage.library.000")
- )
- (copyfiles
- (source SrcLib)
- (dest InstallDir)
- (newname DestLib)
- )
- )
- )
-
- (complete 50)
-
- (if
- (askbool
- (prompt "Do you have djpeg and cjpeg?")
- (help "Select 'Yes' if you have cjpeg and djpeg and you wish to "
- "use them to load and save jpeg files.")
- (default 0)
- )
- (
- (makedir
- "ENV:MPImage"
- )
- (makedir
- "ENVARC:MPImage"
- )
- (set cjpeg
- (askstring
- (prompt "Enter your command to run cjpeg")
- (help '"%s" should be used to in place of the input and '
- "output files")
- (default 'cjpeg "%s" "%s"')
- )
- )
- (textfile
- (dest "ENV:MPImage/cjpeg")
- (append cjpeg)
- )
- (textfile
- (dest "ENVARC:MPImage/cjpeg")
- (append cjpeg)
- )
- (set djpeg
- (askstring
- (prompt "Enter your command to run djpeg")
- (help '"%s" should be used to in place of the input and '
- "output files")
- (default 'djpeg "%s" "%s"')
- )
- )
- (textfile
- (dest "ENV:MPImage/djpeg")
- (append djpeg)
- )
- (textfile
- (dest "ENVARC:MPImage/djpeg")
- (append djpeg)
- )
- )
- )
-
- (complete 75)
-
- (if
- (askbool
- (prompt "Do you have pngtopnm and pnmtopng?")
- (help "Select 'Yes' if you have pngtopnm and pnmtopng and you wish to "
- "use them to load and save PNG files.")
- (default 0)
- )
- (
- (makedir
- "ENV:MPImage"
- )
- (makedir
- "ENVARC:MPImage"
- )
- (set pnmtopng
- (askstring
- (prompt "Enter your command to run pnmtopng")
- (help '"%s" should be used to in place of the input and '
- "output files")
- (default 'pnmtopng "%s" >"%s"')
- )
- )
- (textfile
- (dest "ENV:MPImage/pnmtopng")
- (append pnmtopng)
- )
- (textfile
- (dest "ENVARC:MPImage/pnmtopng")
- (append pnmtopng)
- )
- (set pngtopnm
- (askstring
- (prompt "Enter your command to run pngtopnm")
- (help '"%s" should be used to in place of the input and '
- "output files")
- (default 'pngtopnm "%s" >"%s"')
- )
- )
- (textfile
- (dest "ENV:MPImage/pngtopnm")
- (append pngtopnm)
- )
- (textfile
- (dest "ENVARC:MPImage/pngtopnm")
- (append pngtopnm)
- )
- )
- )
-
- (complete 100)
-